'''
使用哈希表实现
'''
def find_mul_num(nums):
    num_dict = {} #定义一个空字典
    for num in nums:
        if(num in num_dict):
            num_dict[num] += 1
        else:
            num_dict[num] = 1

    return num_dict

#示例
nums = [1,3,5,7,5,6,10,12,10,10]
num_found = find_mul_num(nums)
#遍历字典
for num in num_found:
    if(num_found[num] > 1):
        print(num)
#使用表达式
print({num for num,value in num_found.items() if value > 1})
print({num:value for num,value in num_found.items() if value > 1})